<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
    <meta charset="UTF-8">
    <title>Title</title>
    <link th:href="@{/local/css/login.css}" rel="stylesheet">
    <link th:href="@{/local/css/page.css}" rel="stylesheet">
</head>
<body>

<div id="top" th:include="top.html::top"></div>
<div id="middle">
    <div id="left" th:include="left.html::left"></div>
    <div id="right">
        <div id="msg" th:text="${zc}"></div>
        <hr>
        <a th:href="@{/admin/insert}">添加商品</a>
        <table>
            <tr>
                <th>商品ID</th>
                <th>商品名称</th>
                <th>商品销量</th>
                <th>商品产地</th>
                <th>商品类别</th>
                <th>商品是否热销</th>
                <th>操作</th>
            </tr>

            <tr th:each="gd,stat:${goodsPageInfo.list}" th:class="${stat.odd}?'bg2':''">
                <td th:text="${gd.getGdid()}"></td>
                <td th:text="${gd.getGdname()}"></td>
                <td th:text="${gd.getGdquantity()}"></td>
                <td th:text="${gd.getGdcity()}"></td>
                <td th:text="${gd.getGoodstype().getTname()}"></td>
                <td>
                    <span th:if="${gd.getGdhot()} eq 1">是</span>
                    <span th:unless="${g} eq 1">否</span>
                </td>
                <td>
                    <a th:href="@{/admin/delGoods/} + ${gd.getGdid()}">删除</a>
                    <a th:href="@{/admin/goods/} + ${gd.getGdid()}">编辑</a>
                </td>

            </tr>


        </table>
        <!--</table>-->
        <!--<table><tr><td><a th:href="@{/insertGoods/}">添加</a></td>-->
        <!--</tr>-->
        <!--</table>-->
        <div th:include="page.html::myPage(${goodsPageInfo},goods)"></div>

    </div>
</div>
<div id="bottom" th:include="bottom.html::bottom"></div>
</body>
</html>